package com.xtaller.core.format;

import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;

/**
 * Created by Taller on 2017/8/8.
 */
public class M extends HashMap<String,Object>{

    public static M data(String message){
        return data(message,new JSONObject());
    }
    public static M data(Object object){
        return data("success",object);
    }
    public static M data(String message,Object object){
        M m = new M();
        m.put("message",message);
        m.put("result",object);
        return m;
    }

    public M put(String key,Object val){
        super.put(key,val);
        return this;
    }

}
